<?php
/* @var $this UserRoleController */
/* @var $data UserRole */
?>

<tr>
    <td class="text-center"><label class="pos-rel"><input type="checkbox" class="ace" name="selection[]" value="<?=$data->id?>"><span class="lbl"></span></label></td>
    <td><?php echo CHtml::encode($data->id); ?></td>
    <td><?php echo CHtml::encode($data->name); ?></td>
    <td><?php echo CHtml::encode($data->description); ?></td>
    <td class="text-center"><span class="label <?php if($data->status){echo'label-success';}else{echo'label-default';}?>"><?php echo Constants::getUserStatusItems($data->status); ?></span></td>
    <td><?php echo date('Y-m-d H:i',$data->created_at); ?></td>
    <td><?php echo date('Y-m-d H:i',$data->updated_at); ?></td>
    <td>
        <a href="<?=$this->createUrl('view',array('id'=>$data->id))?>" title="查看" class="btn btn-xs btn-default"><i class="fa fa-eye"></i></a>
        <?php if($data->id != 1 && $data->id != 2){?><a href="<?=$this->createUrl('update',array('id'=>$data->id))?>" title="编辑" class="btn btn-xs btn-info"><i class="fa fa-edit"></i></a><?php }?>
        <?php if($data->id != 1 && $data->id != 2){?><a href="<?=$this->createUrl('delete',array('id'=>$data->id))?>" title="删除" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></a><?php }?>
    </td>
</tr>